          
          
         
            //var originalWidth = consultWidth = window.innerWidth;
            //var linkJumpCount = 16;
            var linkHref;
            var beginningDelay = null;
            var animateDelayCount = 1300;
            //var watchBrowse = null;

            //first ele add class
            function fstAddClass(){
                for(var c = 0;c < $('.addFst').length;c++){
                    $('.addFst:eq(' + c + ')>*:first-child').addClass('active');
                }
            }
            
            function countDown(){
                    linkJumpCount -= 1;
                
                    //linkJumpCount=0时，跳转页面
                    if(linkJumpCount <= 0){
                        location.href = linkHref;
                    }

                    //每秒执行一次,showTime()
                    setTimeout("countDown()",100);
            }
           function showModel(txt){
                $('.subTip').text(txt);
                $('.fillForm .agree .read').remove('active');
                $('.subTip').addClass('active');
                setTimeout(function(){
                    $('.subTip').removeClass('active');
                },2510)
            }
            function back(){
                setTimeout(function(){
                    swtActive('#palace .content .bfr');
                },2520)
            }
            function onMouseScroll(e) {
                    event.preventDefault();
                    var wheel = e.originalEvent.wheelDelta || -e.originalEvent.detail;
                    var delta = Math.max(-1, Math.min(1, wheel) );
                    if(delta < 0){//向下滚动
                        scrollDown = true;
                    }else{//向上滚动
                        scrollDown = false;
                    }
            }
            
            //前进后退页面处于顶部
            function beginningAtTop(){
                setTimeout(function(){
                    document.documentElement.scrollTop = document.body.scrollTop = 0;
                },10)
            }

            //返回顶部
            var toTop = null;
            function windowToTop(){
                clearInterval(toTop);
                toTop = setInterval(function(){
                    var current = document.documentElement.scrollTop || document.body.scrollTop;
                    var val = Math.ceil(current / 10);
                    var newScroll = current - val;
                    if(newScroll <= 0){
                        document.documentElement.scrollTop = document.body.scrollTop = 0;
                        clearInterval(toTop);
                        toTop = null
                    }else{
                        document.documentElement.scrollTop = document.body.scrollTop = newScroll;
                    }
                    
                    
                },10);
                
            }

            //滑动至指定部分
            var scrollInt = null;
            function scrollSec(val){
                scrollInt = setInterval(function(){
                    var now = document.documentElement.scrollTop || document.body.scrollTop;
                    now = parseInt(now);
                    if(now > val){
                        var v = Math.ceil((now - val) / 15);
                        now -= v;
                    }else if(now < val){
                        var v = Math.ceil((val - now) / 15);
                        now += v;
                    }
                    document.documentElement.scrollTop = document.body.scrollTop = now;
                   
                    if(now == val){
                        clearInterval(scrollInt);
                    }
                },10)
            }


            //判断是否为移动设备
            function browserRedirect(){
                var sUserAgent = navigator.userAgent.toLowerCase();
                var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
                var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
                var bIsMidp = sUserAgent.match(/midp/i) == "midp";
                var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
                var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
                var bIsAndroid = sUserAgent.match(/android/i) == "android";
                var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
                var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
                if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
                    $('body').addClass('mobileDevice');
                    return true;
                }else{
                    return false;
                }
            }
             
            function timeTrans(time){
                var date = new Date(time);
                var month = date.getMonth() + 1<10? "0"+(date.getMonth() + 1):date.getMonth() + 1;
                var strDate = date.getDate() < 10? "0" + date.getDate():date.getDate();
                var hrs = date.getHours() < 10?"0" + date.getHours():date.getHours();
                var mins = date.getMinutes() < 10?"0" + date.getMinutes():date.getMinutes();
                var scds = date.getSeconds() < 10?"0" + date.getSeconds():date.getSeconds();
                var currentdate = date.getFullYear() + '-' + month + '-' + strDate + " " +  hrs + ':' + mins + ':' + scds;
                return currentdate;
            }

            function swtActive(elName){
                if($(elName)[0].className.indexOf('active') >= 0){
                    $(elName).removeClass('active');
                }else{
                    $(elName).addClass('active');
                }
            }

            function InitDatePicker(){
                picker1 = $('#datetimepicker1').datetimepicker({
                    format: 'YYYY-MM-DD',
                    locale: moment.locale('zh-cn'),
                    //minDate: '2016-7-1'
                });
                $('#datetimepicker1').datetimepicker({
                    format: 'YYYY-MM-DD',
                    locale: moment.locale('zh-cn'),
                    defaultDate: '2020-04-02'
                });
            }
            //拖动时复制文本透明背景色
            //window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();

           
            $(document).ready(function(){
                    browserRedirect(); 
                    fstAddClass();
                    setTimeout(function(){
                        //console.log(contn.$children[1].statusAry);
                        

                        $('#resume').change(function(){
                            console.log($(this).val());
                            if ($(this).val() != ''){
                                var fileobj = $("#resume")[0].files[0];
                                var form = new FormData();
                                form.append("file", fileobj);
                                form.append("uesr", 'alex');
                                console.log(fileobj);
                                console.log(form);
                                var fileName = $(this).val().substring($(this).val().lastIndexOf( '\\' ) + 1 );
                                $('.valBox .upld .fileName').text(fileName);
                                $('.valBox .upld').addClass('uplded');
                            }
                        })
                        $('.valBox .upld>*').click(function(){
                            $('#resume')[0].click();
                        })

                        InitDatePicker();                       
                    },200)
             
            })
            

            
            

        